import { IFeidaoAiNodejsComponent } from '@feidao/web/interfaces';

////////////////////////////////////////////////////////////////////////////////
// import presentations
import p001 from './p001';
import nodejs from '@feidao/web/atom/nodejs/msg/nodejs';
import render from '@feidao/web/atom/nodejs/render/render';
import storage_set from '@feidao/web/atom/nodejs/storage/put';
// import call_service from '@feidao/web/atom/nodejs/msg/call-service';
import p002 from './p002';
// import p003 from './p003';
////////////////////////////////////////////////////////////////////////////////


export default async function na001(fd: IFeidaoAiNodejsComponent, ...args: any[]) {
	const data = await nodejs(fd.data.actionid, fd.data.sessionid, fd.data.spaceid, 'db-query', {});
	render(fd.data.node, data, p001, 'p001');

	const data1 = await nodejs(fd.data.actionid, fd.data.sessionid, fd.data.spaceid, 'test/db-query', {});
	render(fd.data.node, data1, p002, 'p002');

	await storage_set('data', data, 'page');

	// 调用服务
	// await call_service(fd.data.actionid, fd.data.sessionid, fd.data.spaceid, '', {});
}
